Skip to content

fix: the command line proves itself with a per-run key - #40

Merged
nodemode-ai merged 3 commits into
mainfrom
fix/owner-decisions-2026-11-29
Nov 29, 2026
Merged

nodemode-ai merged 3 commits into
mainfrom
fix/owner-decisions-2026-11-29

Conversation

@gbarnai

@gbarnai gbarnai commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • The command line now proves who it is with a key, not a header name: the engine writes a new random key to cli.key in its data folder on each start (user-only file, created new, removed on stop), and only a request carrying it skips the window question for convert_file and run_command.
  • The X-Formvis-Client header only names the caller now; it no longer skips any question.
  • cli serve's tool.call with run_command needs yes for a risky command, as command.run does.
  • The CLI sends the key only to an engine on this computer and reads it from the same data folder the engine uses.
  • docs/MANUAL.md says what the command line is and is not asked about.
  • New tests in backend/tests/test_cli_key.py.

Tests

  • Each change has tests that fail on the code before it.
  • The repo's CI commands were run locally on macOS; every local failure also fails on main in the same environment. Please rely on this PR's CI for Linux and Windows.

How to ship

  • Follows the earlier hardening PR, already merged. Independent of other repos. No version bump.

…h start, not by its name

The engine makes a new key on each start and writes it to cli.key in its
data folder (mode 0600, created new, removed on stop). ./formvis cli reads
it and sends it; only a request with that key skips the Ask question for
convert_file and run_command. The X-Formvis-Client header names the caller
and skips nothing. tool.call run_command in serve needs yes, as command.run
does. The manual says what the command line is and is not asked about.
…s the engine does

The engine reads FORMVIS_DATA_DIR and FORMVIS_PORTABLE from backend/.env when the
environment does not set them; the command line now does the same when it looks
for cli.key. The wiki's Agents page says what the key skips.
@gbarnai
gbarnai requested a review from nodemode-ai as a code owner November 29, 2026 20:09
@nodemode-ai
nodemode-ai merged commit cb5e581 into main Nov 29, 2026
6 checks passed
@nodemode-ai
nodemode-ai deleted the fix/owner-decisions-2026-11-29 branch November 29, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants